<?php
session_start();
$user_id = $_SESSION['userid'];

if(!$user_id){
    echo "<script language='javascript'>alert('请先登录！');location='/';</script>";
}


?>